package com.heima.apis.article;

import com.heima.apis.article.fallback.IArticleClientFallBack;
import com.heima.model.article.dtos.ArticleDto;
import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.ManageDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(value = "leadnews-article",fallback = IArticleClientFallBack.class)
public interface IArticleClient {

    @PostMapping("/api/v1/article/save")
    ResponseResult saveArticle(@RequestBody ArticleDto dto);


    @PostMapping("/api/v1/article/manage")
    PageResponseResult getNewsList(ManageDto dto);

    @PostMapping("/api/v1/article/isComment")
    String getIsComment(Long articleId);

    @PostMapping("/api/v1/article/getArticleConfig")
    void getArticleConfig(@RequestParam Long articleId, @RequestParam int start);
}